import java.util.*;

/**
 * @author LKQ
 * @date 2022/4/3 14:03
 * @description 模拟，将其都转换为分钟，
 */
public class Solution {
    public static void main(String[] args) {

    }
    public int convertTime(String current, String correct) {
        int curHour = Integer.parseInt(current.substring(0, 2));
        int curMi = Integer.parseInt(current.substring(3, 5));
        int mi = curHour * 60 + curMi;

        int coHour = Integer.parseInt(correct.substring(0, 2));
        int curHi = Integer.parseInt(correct.substring(3, 5));
        int c = coHour * 60 + curHi;

        int ans = 0;
        while ( c > mi) {
            if (c - mi >= 60) {
                c -= 60;
            }else if (c - mi >= 15) {
                c -= 15;
            }else if (c - mi >= 5) {
                c -= 5;
            }else if (c - mi >= 1) {
                c -= 1;
            }
            ans++;
        }
        return ans;

    }
}
